<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <base href="<%=basePath%>">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script type="text/javascript" src="scripts/jquery/jquery-1.7.1.js"></script>
	<link href="style/authority/basic_layout.css" rel="stylesheet" type="text/css">
	<link href="style/authority/common_style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="scripts/authority/commonAll.js"></script>
	<script type="text/javascript" src="scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
	<script type="text/javascript" src="scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
	<link rel="stylesheet" type="text/css" href="style/authority/jquery.fancybox-1.3.4.css" media="screen"></link>
	<script type="text/javascript" src="scripts/artDialog/artDialog.js?skin=default"></script>
   
    
    <title>用户查询</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" src="scripts/Myscripts/alpha_add.js"></script>

<script language="javascript" type="text/javascript">
//onclick="document.form1.action='servlet/Userqueryservlet?type=update&userid=${u_name}'"
		function edit()
		{
			if(document.getElementById("u_name").value=="")
				return false;
				else
				document.form1.action="servlet/Userqueryservlet?type=update&userid=${u_name}";
		}
</script>

  </head>
  
  <body>    
  <div id = "add_alpha_id">
    <div align="center">
  		<form name="form1" action="servlet/Userqueryservlet?type=query" method="post">
  		<div id="container">	
		<div class="ui_content">
				<div class="ui_text_indent">
					<div id="box_border">
						<div id="box_top">查询</div>
						<div id="box_center" >
							用户名/移动电话/身份证号：&nbsp;&nbsp;<input class="ui_input_txt02" type="text" id="userquery_id" name="userquery_id"/>
						</div>
						<div id="box_bottom">
							<input class="ui_input_btn01" type="submit" value="查询"/>
						</div>
					</div>
				</div>
			</div>		
			<div class="ui_content">
				<div class="ui_tb"> 			
  			<table class="table" width="100%" id="userquery">
  				<tr><th align="center">用户名</th><th align="center">客户姓名</th><th align="center">身份证号</th>
  					<th align="center">单位名称</th><th align="center">移动电话</th><th align="center">座机</th> <th>操作</th> 				
  				</tr>
				<tr>
					<td><label>${u_name==null?"":u_name}</label></td>
					<td><label>${user_nick==null?"":user_nick}</label></td>
					<td><label>${id_card==null?"":id_card}</label></td>
					<td><label>${company==null?"":company}</label></td>
					<td><label>${cellphone==null?"":cellphone}</label></td>
					<td><label>${tel==null?"":tel}</label></td>
					<td>
					<c:if test="${u_name!=null}">
						<button class="ui_input_btn01" onclick="document.form1.action='servlet/Userqueryservlet?type=update&userid=${u_name}'">修改</button>&nbsp;&nbsp;&nbsp;
						<button class="ui_input_btn01" onclick="document.form1.action='servlet/Userqueryservlet?type=delete&userid=${u_name}'">删除</button>
					</c:if>
					</td>
				</tr>
  			</table>
  			</div>
  			</div>
  			</div>
  		</form>
  	</div>
    </div>
      <script type="text/javascript">
	  if(${deleteuser=="failed"}) alert("该用户有订单记录，不可删除！");
	  </script>
    <script type="text/javascript">
    var eitem = document.getElementById("add_alpha_id");
    window.onload = add_alpha(eitem);
    </script>
  </body>
</html>
